<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .active{color:red}
    </style>
</head>
<body>
    <p>文字</p>
    <p>文字2</p>
<script>
/* 
1. 如何识别浏览器的类型
2. 分析拆分Url各部分
3.  
*/
const ua = navigator.userAgent;
const isChrome  = ua.indexOf("Chrome");
console.log(isChrome)

console.log(screen.width,screen.height)

// location.href
// location.protocol 协议
// location.host  域名
// location.search 查询
// location.hash 哈希值
// location.pathname  路径
 
</script>
</body>
</html>